﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

namespace SchoolAuthentication
{
    public partial class Site : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            MembershipUser mshu = Membership.GetUser();
            if (mshu != null)
                LabelCurrentUser.Text = " | [" + mshu.UserName + "]";
            else
                LabelCurrentUser.Text = " | [GUEST]";
        }

        protected void LinkButtonLogout_Click(object sender, EventArgs e)
        {
            FormsAuthentication.SignOut();
            FormsAuthentication.RedirectToLoginPage();
        }

 
    }
}